﻿using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Events.Distributed;

namespace AbpVnext_Order_Contracts.Dto
{
    public class OrderCreateDto : EntityDto<int>  //, IValidatableObject
    {
        public string? OrderSn { get; set; }

        public string TotalPrice { get; set; }

        public decimal TotalDiscount { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public class DemoCreateDto
    {
        //验证字段不能为空
        [Required]
        //字段值长度验证
        [StringLength(10)]
        public string OrderSn { get; set; }

        public string TotalPrice { get; set; }

        /// <summary>
        /// 限制值范围
        /// </summary>
        [Range(0, 10)]
        public int Prece { get; set; }
    }
}
